package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkEmployeeEducation;
import com.ysd.lis.entity.WkEmployeeJobHistory;
import com.ysd.lis.service.WkEmployeeJobHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工档案-工作经历表 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-02-23
 */
@RestController
@RequestMapping("/wk/employeeJobHistory")
public class WkEmployeeJobHistoryController extends BaseController {

    @Autowired
    WkEmployeeJobHistoryService wkEmployeeJobHistoryService;

    @GetMapping("/getEmployeeJobHistory/{wkEmployeeId}")
    public Result getEmployeeJobHistory(@PathVariable("wkEmployeeId") String wkEmployeeId) {
        return wkEmployeeJobHistoryService.getEmployeeJobHistory(wkEmployeeId);
    }

    @PostMapping("/addEmployeeJobHistory")
    public Result addEmployeeJobHistory(@RequestBody WkEmployeeJobHistory wkEmployeeJobHistory) {
        return wkEmployeeJobHistoryService.addEmployeeJobHistory(wkEmployeeJobHistory);
    }

    @PostMapping("/updateEmployeeJobHistory")
    public Result updateEmployeeJobHistory(@RequestBody WkEmployeeJobHistory wkEmployeeJobHistory) {
        return wkEmployeeJobHistoryService.updateEmployeeJobHistory(wkEmployeeJobHistory);
    }

    @PostMapping("/deleteEmployeeJobHistory")
    public Result deleteEmployeeJobHistory(@RequestBody WkEmployeeJobHistory wkEmployeeJobHistory) {
        return wkEmployeeJobHistoryService.deleteEmployeeJobHistory(wkEmployeeJobHistory);
    }
}
